console.log('11');
function replaceSpace(str)
{
    // write code here
    // return (str.replace(/\40/g, '%20'));
    var arr = str.split('\40')
    console.log(arr);
    return arr.join('%20')
        
}
console.log( replaceSpace("hello world"));
